//
//  ApiManager.h
//  GoftApp
//
//  Created by admin on 15/9/6.
//  Copyright (c) 2015年 mohe. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking/AFHTTPSessionManager.h>

#define API_SERVERIP            @"test.mohekeji.cn/luxury"
#define kErrorDomain            @"com.mohe.luxury"

@interface ApiManager : AFHTTPSessionManager
{
    
}

IMPLEMENT_SINGLETON_HEADER(ApiManager)

//验证服务器返回的数据
+ (NSError *)analysisData:(id)data;

- (NSURLSessionDataTask *)post:(NSString *)url
                    parameters:(NSDictionary *)parameters
                     OnSuccess:(void (^)(id result))successHandler
                     onFailure:(void (^)(NSError *error))failureHandler;
- (void)post:(NSString *)url parameters:(NSDictionary *)parameters constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block OnSuccess:(void (^)(id))successHandler onFailure:(void (^)(NSError *))failureHandler;
@end
